package org.example.diary.entity.dto;

import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import org.example.diary.validator.UpdateGroup;

@Data
public class SysUserAddDTO {

    /**
     * 修改时必填，新增时不填
     */
    @NotNull(message = "id不可为空", groups = UpdateGroup.class)
    private Integer id;

    /**用户名*/
    @NotEmpty(message = "请输入用户名")
    private String userName;

    /**密码*/
    @NotEmpty(message = "请输入密码")
    private String password;

    /**
     * 默认 2
     */
    private Long roleId = 2l;
}
